package com.easydisk.constant;


/**
 * 文件模块常量类
 */
public class FileConstant {

    public static final String CONTENT_TYPE_STR = "content-type";
    public static final String APPLICATION_OCTET_STREAM_STR = "application/octet-stream";
    public static final String CONTENT_DISPOSITION_STR = "Content-Disposition";
    public static final String CONTENT_DISPOSITION_VALUE_PREFIX_STR = "attachment;fileName=";
    public static final String GB2312_STR = "GB2312";
    public static final String IOS_8859_1_STR = "ISO-8859-1";
    public static final String CN_LEFT_PARENTHESES_STR = "(";
    public static final String CN_RIGHT_PARENTHESES_STR = ")";
    public static final String ALL_FILE_CN_STR = "全部文件";
    public static final Long  ROOT_FOLDER_PARENT_ID  = 0L;

    public static final Long DEFAULT_MAX_DISK_SIZE = 5L;



    /**
     * 分片数最大
     */
    public static final Integer MAX_NUMBER_SHARDS= 10000;

    /**
     * 所有文件类型查询标识
     */
    public static final String ALL_FILE_TYPE = "-1";

    /**
     * 分片默认过期时间（天）
     */
    public static final Integer CHUNK_FILE_EXPIRATION_DAYS = CommonConstant.ONE_INT;


    public enum FolderFlagEnum {
        /**
         * 是否是文件夹枚举类
         * 0 不是
         * 1 是文件夹
         */
        NO(0),
        YES(1);

        FolderFlagEnum(Integer code) {
            this.code = code;
        }

        private final Integer code;

        public Integer getCode() {
            return code;
        }
    }

    /**
     * 是否删除
     */
    public enum DelFlagEnum {
        /**
         * 0 存在
         * 1 删除
         */
        NO(0),
        YES(1);

        DelFlagEnum(Integer code) {
            this.code = code;
        }

        private final Integer code;

        public Integer getCode() {
            return code;
        }
    }

    /**
     * 合并标识
     */
    public enum MergeFlag {
        /**
         * 未准备好合并
         */
        NOT_READY(0),
        /**
         * 可以合并
         */
        READY(1);

        MergeFlag(Integer code) {
            this.code = code;
        }

        private Integer code;

        public Integer getCode() {
            return code;
        }
    }

}
